package com.genesis.yunnanji.adapter;

import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;


import com.genesis.yunnanji.R;
import com.genesis.yunnanji.bean.EarningsBean;
import com.youth.xframe.adapter.XRecyclerViewAdapter;
import com.youth.xframe.adapter.XViewHolder;

import java.util.List;

/**
 * 创建日期：2018/9/26 on 14:26
 * 作者:Kite
 * 描述:
 */
public class EarningsAdapter extends XRecyclerViewAdapter<EarningsBean> {

    public EarningsAdapter(@NonNull RecyclerView mRecyclerView, List<EarningsBean> dataLists) {
        super(mRecyclerView, dataLists, R.layout.item_earnings);
    }

    @Override
    protected void bindData(XViewHolder holder, EarningsBean data, int position) {
        holder.setText(R.id.time, data.getTime());
        holder.setText(R.id.earnings_title, data.getTitle());
        holder.setText(R.id.earnings_price, data.getPrice());
        holder.setText(R.id.earnings_num, "订单编号：" + data.getOrderNum());
        holder.setText(R.id.earnings_balance, "余额：" + data.getBalance());
    }
}
